<template>
  <div class="djcatelist">
    <div class="li" style="color: #44aaf8;" @click="toRankingPage">
      <i class="iconfont icon-paihangbang" style="font-size: 40px;"></i>
      <span>排行榜</span>
    </div>
    <div class="li" v-for="(item, index) in djCatelist" :key="index" @click="toDjTypePage(item.id)">
      <img :src="item.pic56x56Url" />
      <span>{{ item.name }}</span>
    </div>
  </div>
</template>

<script>
export default {
  props: ['djCatelist'],
  data () {
    return {}
  },
  methods: {
    toRankingPage () {
      this.$router.push('/find_music/rankinglist')
    },
    toDjTypePage (type) {
      this.$router.push('/category_radio/' + type)
    }
  },
  created () {
    // this.getDjCateList()
  }
}
</script>

<style lang="less" scoped>
  .djcatelist {
    width: 95%;
    margin: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    .li {
      margin: 20px 0;
      padding: 10px 15px;
      display: flex;
      flex-direction: column;
      border-radius: 5px;
      cursor: pointer;
      img {
        width: 40px;
        height:40px;
        margin: auto;
      }
      span {
        padding: 10px 0;
      }
    }
    .li:hover {
      background-color: #e8e8e8;
    }
  }
</style>
